import java.io.IOException;
import java.util.concurrent.LinkedBlockingQueue;


public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		//Session session = HibernateUtil.getSessionFactory().openSession();
		
		CrawlerOneThread crawl = new CrawlerOneThread();
		LinkedBlockingQueue<String> fileUrl = new LinkedBlockingQueue<String>(200000);

		fileUrl.add("http://www.youtube.com/watch?v=AJ_Z2U61Bzo");
		fileUrl.add("http://www.youtube.com/watch?v=1xwtLAtRCKQ");
		fileUrl.add("http://www.youtube.com/watch?feature=player_embedded&v=S2Rgr6yuuXQ");

		try {
			while(fileUrl.size() != 0){
				crawl.getPageContent(fileUrl);
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
